package com;

public class Container<T> {
	private T[] ct;
	private int index;
	
	@SuppressWarnings("unchecked")
	public Container() {
		ct=(T[]) new Object[5];
	}
	
	public void save(T e){
		ct[index]=e;
		index++;
	}
	
	public T remove(){
		index--;
		return ct[index];
	}
	
	public boolean isFull(){
		if(index>=4) return true;
		return false;
	}
	
	public boolean isEmpty(){
		if(index<=0) return true;
		return false;
	}
}
